package com.bbzn.device.client.dao.mqttsub;

import com.bbzn.device.client.dataobject.MqttSub;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface MqttSubMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MqttSub record);

    int insertOrUpdate(MqttSub record);

    int insertOrUpdateSelective(MqttSub record);

    int insertSelective(MqttSub record);

    MqttSub selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MqttSub record);

    int updateByPrimaryKey(MqttSub record);

    List<MqttSub> findByAll(MqttSub mqttSub);

    int updateBatch(List<MqttSub> list);

    int updateBatchSelective(List<MqttSub> list);

    int batchInsert(@Param("list") List<MqttSub> list);

    List<MqttSub> findListByGroupId(@Param("ids") List<Long> ids);

    List<MqttSub> findListByGid(@Param("ids") List<Long> ids);

    int deleteByGroupId(@Param("ids") List<Long> ids);

    int batchDel(@Param("ids") List<Integer> list);

    int updateTopicByClientIdAndOldTopic(@Param("oldTopic") String oldTopic, @Param("client") String client,
                                         @Param("updateTopic") String updateTopic, @Param("updateTime") Date updateTime, @Param("updatedBy") String updatedBy);
}